import { Iconfont } from './Icon'
// import { Row, RowItem } from './Row'
import RowItem from '@/components/Base/Row/RowItem.vue'
import Row from '@/components/Base/Row/Row.vue'
import Center from '@/components/Base/Layout/Center.vue'
import Left from '@/components/Base/Layout/Left.vue'
import Avatar from '@/components/Base/Image/Avatar.vue'
import ComButton from '@/components/Base/ComButton/ComButton.vue'

const compList = [Iconfont, Row, RowItem, Center, Left, Avatar, ComButton]

let registered = false

export function registerGlobalCom(app) {
  if (registered) return
  compList.forEach((comp) => {
    app.component(comp.name, comp)
  })
  registered = true
}
